<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@page import="java.sql.ResultSet"%>
<%@ page import="controle.Fachada" %>
<%@ page import="negocio.*" %>
<%@page import="excecoes.PessoaNaoCadastradaException"%><html>
<head>


<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Filtrar Pessoa</title>


<style type="text/css">
<!--
.btCancelar {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #990000;
	background-color: #CCCCFF;
	font-style: italic;
}

.btSalvar {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000033;
	background-color: #CCCCFF;
	font-weight: bold;
	text-transform: capitalize;
}

.textoTabela {
	font-family: Courier, monospace;
	font-size: 12px;
	color: #000066;
	font-weight: bold;
	text-transform: capitalize;
}
-->
</style>

<script type="text/javascript">
function habilitaGrupo(valor) {
	  var elementos = document.getElementsByTagName("input");
	 for (i=0; i<=elementos.length-1; i++)
	  {
	    if ( valor==0 ){
	    	if (elementos[i].name == "rdTrancada"){
	        	elementos[i].removeAttribute("disabled");
	        }
	    	if (elementos[i].name == "rdProjeto"){
	    		elementos[i].setAttribute("disabled","disabled");	    		
	        }
	    }
	    if(valor==1){
	    	if (elementos[i].name == "rdTrancada"){
	    		elementos[i].setAttribute("disabled","disabled"); 	
	        }
	    	if (elementos[i].name == "rdProjeto"){
	    		elementos[i].removeAttribute("disabled");
	    	}
	    }
	  }
}

function verificaPessoa(rdButton){
	if(rdButton.value=="aluno"){
		frmPesquisa.txtCurso.disabled = false;
		habilitaGrupo(0);
	}
	if(rdButton.value=="professor"){
		frmPesquisa.txtCurso.disabled = true;
		frmPesquisa.txtCurso.value = "";
		habilitaGrupo(1);
		
	}
	
}

</script>
</head>
<body>
<form action="./proc/proc_lstPessoa.jsp" method="post" name="frmPesquisa">
<table style="text-align: left; height: 196px; width: 467px;"
	bgcolor="#440000" cellpadding="1" cellspacing="1">

	<tbody bgcolor="#aaaaaa">

		<tr>

			<td bgcolor=#333333 colspan="2"><b><font color=white>Filtrar
			pessoa</font></b></td>

		</tr>

		<tr>

			<td>Matr&iacute;cula:</td>
			<td><input size="10" name="txtMatricula" type="text"></td>

		</tr>

		<tr>

			<td>Nome:</td>
			<td><input size="20" name="txtNome" type="text"></td>

		</tr>

		<tr>

			<td>Tipo:</td>
			<td>Aluno <input name="rdTipo" type="radio" value="aluno" onclick="verificaPessoa(this)">&nbsp;&nbsp;
			Professor <input name="rdTipo" type="radio" value="professor" onclick="verificaPessoa(this)" ></td>

		</tr>

		<tr>

			<td>Curso:</td>
			<td><input size="20" name="txtCurso" type="text" disabled="true"></td>

		</tr>

		<tr>

			<td>Matr&iacute;cula Trancada:</td>
			<td>Sim <input name="rdTrancada" type="radio" value="1" >&nbsp;&nbsp;
			N&atilde;o <input name="rdTrancada" type="radio" value="0"></td>

		</tr>

		<tr>

			<td>Possui projeto de pesquisa:</td>
			<td>Sim <input name="rdProjeto" type="radio" value="1">&nbsp;&nbsp;
			N&atilde;o <input name="rdProjeto" type="radio" value="0"></td>

		</tr>

		<tr>

			
			<td colspan=2 align="center"><input name="btFiltrar" type="submit" class="btSalvar" value='Consultar'></td>

		</tr>

	</tbody>
</table>
</form>

</body>
</html>
